Package-level declarations

Types

Link copied to clipboard

An action linked to contextual input, be it a keybind press, mouse click, or other event. This is the heart of the Context handling system in Fzzy Config, providing the actual "doing" of actions.

Link copied to clipboard
interface ContextHandler

Handles a context input. This is the downstream-facing counterpart of ContextProvider; it passes unhandled context downstream for further handling. This handling doesn't have to use ContextAction to achieve its goals, but that may be a convenient method to do so (perhaps via requesting context action via children ContextProvider)

Link copied to clipboard

Defines the type of input that triggered a context action.

Link copied to clipboard
interface ContextProvider

Generates a set of grouped context actions upon request. This is the upstream-facing counterpart of ContextHandler; it applies its results to a builder provided from upstream for further amendment and usage upstream. This may be used together with a handler (handler requests potential context inputs by requesting for them from it's children provider(s))

Link copied to clipboard

Builds an organized set of context actions for use by a context handler. This is typically built in an upstream direction; that is to say a parent will request context with an empty builder, and then building will start with the most downstream ContextProvider child, with intermediate layers then building on that result before ending up with a completely built-up builder back at the call site.

Link copied to clipboard

A context action key, that doubles as a "keybind", presenting itself as relevant for context handling if key/mouse input is relevant to it.

Link copied to clipboard
data class Position(val contextInput: ContextInput, val mX: Int, val mY: Int, val x: Int, val y: Int, val width: Int, val height: Int, val screenWidth: Int, val screenHeight: Int)

Position context information for context handling. Includes information about the screen, mouse, and scoped context area. This scoped context initially is the same as screen context (i.e. x: 0, y: 0, w: screenW, h: screenH), but can be updated with proper scoped information as handling moved downstream. For example if handling moves to a widget, it can update xy and wh with it's xy position and width/height.